import 'package:FiduMart/generated/json/base/json_convert_content.dart';
import 'package:FiduMart/core/network/model/game_entry_entity.dart';

GameEntryEntity $GameEntryEntityFromJson(Map<String, dynamic> json) {
  final GameEntryEntity gameEntryEntity = GameEntryEntity();
  final int? type = jsonConvert.convert<int>(json['type']);
  if (type != null) {
    gameEntryEntity.type = type;
  }
  final String? address = jsonConvert.convert<String>(json['address']);
  if (address != null) {
    gameEntryEntity.address = address;
  }
  return gameEntryEntity;
}

Map<String, dynamic> $GameEntryEntityToJson(GameEntryEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['type'] = entity.type;
  data['address'] = entity.address;
  return data;
}

extension GameEntryEntityExt on GameEntryEntity {
  GameEntryEntity copyWith({
    int? type,
    String? address,
  }) {
    return GameEntryEntity()
      ..type = type ?? this.type
      ..address = address ?? this.address;
  }
}